<template>
  <div class="app-container">
    <el-tabs style='margin:-10px -20px 0px -20px;' type="border-card">
      <el-table :data="list" border fit highlight-current-row class="infotable">
         <el-table-column  label='用户ID' width="auto">
          <template slot-scope="scope">
            <!-- {{scope.row.OrderNo}} -->
          </template>
        </el-table-column>
        <el-table-column  label='用户名' width="auto">
          <template slot-scope="scope">
            <!-- {{scope.row.PayTypeText}} -->
          </template>
        </el-table-column>
        <el-table-column  label='手机号码' width="auto">
          <template slot-scope="scope">
            <!-- {{scope.row.OrderTypeText}} -->
          </template>
        </el-table-column>
        <el-table-column  label='电子邮箱' width="auto">
          <template slot-scope="scope">
            <!-- {{scope.row.PayModeText}} -->
          </template>
        </el-table-column>    
        <el-table-column  label='账户状态' width="auto">
          <template slot-scope="scope">
            <!-- {{formatDateTime(scope.row.RegDateTime)}} -->
          </template>
        </el-table-column>
        <el-table-column  label='登记人' width="auto">
          <template slot-scope="scope">
            <!-- {{scope.row.PayNote}} -->
          </template>
        </el-table-column>
        <el-table-column  label='注册时间' width="auto">
          <template slot-scope="scope">
            <!-- {{scope.row.PayNote}} -->
          </template>
        </el-table-column>
      </el-table>      
      <div class="pagination-container" style='margin-top:15px;float:right;'>
      <el-pagination v-if="total > 0" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="data.page_index" :page-sizes="[5,10,20,30,50]" :page-size="data.page_size" layout="total, sizes, prev, pager, next, jumper" :total="total">
      </el-pagination>
    </div>
    </el-tabs>
  </div>
</template>

<script>
//   import shared from '../../../../shared';
//   import {
//     getHrCost //url:'/Hr/GetHrCost'
//   } from '@/api/busi_HumanResource';
  export default {
    props: {
      HrID: {
        type: Number,
        default: 0
      }
    },
    data() {
      return {
        total: 0,
        list: [],
        data: {
          hr_id: this.$props.HrID,
          page_index: 1,
          page_size: 10
        },
      };
    },
    created() {
    //   this.getList();
    },
    methods: {
      formatPrice(price) {
        return shared.formatPrice(price);
      },
      formatDateTime(datetime) {
        return shared.formatDateTime(datetime);
      },
      handleSizeChange(val) {
        this.data.page_size = val;
        this.getList();
      },
      handleCurrentChange(val) {
        this.data.page_index = val;
        this.getList();
      },
      Refresh(){
        this.getList();
      },
      getList() {
        getHrCost(this.data).then(m => {
          if (m.errcode == 0) {
            this.list = m.data.list;
            this.total = m.data.total_item_count;
          }
        });

      },
    }
  };

</script>

<style scoped>

</style>
